﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Floating Point Types</title>
</head>

<body>

<h4 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.5em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating Point Types</h4>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
In the previous chapter we have seen that despite their ease of use, arithmetic 
operations on integers are prone to programming errors due to overflow, 
underflow, and truncation. We have also seen that integers cannot have values 
with fractional parts as in 1.25.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating point types are especially to support fractional parts. The &quot;point&quot; in 
their name comes from the<span class="Apple-converted-space">&nbsp;</span><i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">decimal 
point</i><span class="Apple-converted-space">&nbsp;</span>and &quot;floating&quot; refers to an 
implementation detail of how these types are implemented: the decimal point<span class="Apple-converted-space">&nbsp;</span><i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">floats</i><span class="Apple-converted-space">&nbsp;</span>left 
and right as appropriate. (This detail is not important when using these types.)</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
We must cover important details in this chapter as well. Before doing that, I 
would like to give a list of some of the interesting aspects of floating point 
types:</p>
<ul style="margin: 0.5em 1em 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	Adding 0.001 a thousand times is not the same as adding 1.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	Using the logical operators<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">==</code><span class="Apple-converted-space">&nbsp;</span>and<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">!=</code><span class="Apple-converted-space">&nbsp;</span>with 
	floating point types is erroneous in most cases.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	The initial values of floating point types is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code>, 
	not 0.<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>may 
	not be used in expressions. When used in comparison operations,<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code>is 
	not less than nor greater than any value.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	The overflow value is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.infinity</code><span class="Apple-converted-space">&nbsp;</span>and 
	the underflow value is negative<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.infinity</code>.</li>
</ul>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Although floating point types are more useful in some cases, they have 
peculiarities that every programmer must know. Compared to integers, they are 
very good with avoiding truncation because their main purpose is to support 
fractional values. Like any other type, being based on certain numbers of bits, 
they too are prone to overflow and underflow, but compared to integers, the 
range of values that they can support is vast. Additionally, instead of being 
silent in the case of overflow and underflow, they get the special values of 
positive and negative<i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">infinity</i>.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
As a reminder, all of the floating point types are the following:</p>
<table border="1" cellpadding="4" cellspacing="0" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;" width="400">
	<tbody style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			Type</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			Number of Bits</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			Initial Value</th>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<tt style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
			float</tt></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			32</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			float.nan</td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<tt style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
			double</tt></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			64</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			double.nan</td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<tt style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
			real</tt></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			at least 64, maybe more<br />
			(e.g. 80, depending on hardware support)</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			real.nan</td>
		</tr>
</table>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating point type properties</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating point types have more properties than other types:</p>
<ul style="margin: 0.5em 1em 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
	.stringof</code><span class="Apple-converted-space">&nbsp;</span>is the name of 
	the type.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
	.sizeof</code><span class="Apple-converted-space">&nbsp;</span>is the length of 
	the type in terms of bytes. (In order to determine the bit count, this value 
	must be multiplied by 8, the number of bits in a byte.)</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
	.max</code><span class="Apple-converted-space">&nbsp;</span>is the short for 
	&quot;maximum&quot; and is the maximum value that the type can have; the negative of 
	this value is the minimum value that the type can have.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
	.min_normal</code><span class="Apple-converted-space">&nbsp;</span>is the 
	smallest normalized value that this type can have (the type can have smaller 
	values than<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.min_normal</code><span class="Apple-converted-space">&nbsp;</span>but 
	the precision of those values are less than the normal precision of the 
	type).</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
	.dig</code><span class="Apple-converted-space">&nbsp;</span>is the short for 
	&quot;digits&quot; and specifies the number of digits that signify the precision of 
	the type.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
	.infinity</code><span class="Apple-converted-space">&nbsp;</span>is the special 
	value used to denote overflow and underflow.</li>
</ul>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Note that the minimum value of floating point types is not<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.min</code><span class="Apple-converted-space">&nbsp;</span>but 
the negative of<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.max</code>, 
e.g. the minimum value of<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">double</code><span class="Apple-converted-space">&nbsp;</span>is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">-double.max</code>.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Other properties of floating point types are used less commonly. You can see all 
of them at<span class="Apple-converted-space">&nbsp;</span><a href="http://dlang.org/property.html" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: purple; text-decoration: none; background-position: initial initial; background-repeat: initial initial;">Properties 
for Floating Point Types</a>.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The properties of floating point types and their relations can be shown on a 
number line like the following:</p>
<pre class="mono" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">    +       +-----------+------------+  ....  +  ....  +----------+----------+     +
    |     -max         -1            |        0        |          1         max    |
-infinity                      -min_normal         min_normal                   infinity
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The dashed portions of the line above are to scale: the number of values that 
can be represented between<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">min_normal</code><span class="Apple-converted-space">&nbsp;</span>and 
1 is equal to the number of values that can be represented between 1 and<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">max</code>. 
This means that the precision of the fractional parts of the values that are 
between<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">min_normal</code><span class="Apple-converted-space">&nbsp;</span>and 
1 are very high. (The same is true for the negative side as well.)</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
.nan</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
We have already seen that this is the default value of floating point variables.<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>may 
appear as a result of meaningless floating point expressions as well. For 
example the floating point expressions in the following program all produce<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">double.nan</code>:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">import</span> std.stdio;

<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">void</span> main()
{
    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span> zero = 0;
    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span> infinity = <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.infinity;

    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;any expression with nan: &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.nan + 1);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;zero / zero            : &quot;</span>, zero / zero);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;zero * infinity        : &quot;</span>, zero * infinity);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;infinity / infinity    : &quot;</span>, infinity / infinity);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;infinity - infinity    : &quot;</span>, infinity - infinity);
}
</pre>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Specifying floating point values</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating point values can simply be specified as integers without a decimal 
point like 123, or with a decimal point like 12.3.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating point values can also be specified with the special floating point 
syntax as in<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">1.23e+4</code>. 
The<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">e+</code><span class="Apple-converted-space">&nbsp;</span>part 
in that syntax can be read as &quot;times 10 to the power of&quot;. According to that 
reading, the previous value is &quot;1.23 times 10 to the power of 4&quot;, which is the 
same as &quot;1.23 times 10<sup style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 0.75em; vertical-align: top; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">4</sup>&quot;, 
which in turn is the same as 1.23x10000, being equal to 12300.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
If the value after<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">e</code><span class="Apple-converted-space">&nbsp;</span>is 
negative as in<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">5.67e-3</code>, 
then it is read as &quot;divided by 10 to the power of&quot;. Accordingly, this example is 
&quot;5.67 divided by 10<sup style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 0.75em; vertical-align: top; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">3</sup>&quot;, 
which in turn is the same as 5.67/1000, being equal to 0.00567.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The values that are printed by the following program are all in the floating 
point format. The program prints the properties of the three types:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">import</span> std.stdio;

<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">void</span> main()
{
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Type                    : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">float</span>.stringof);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Precision               : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">float</span>.dig);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Minimum normalized value: &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">float</span>.min_normal);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Maximum value           : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">float</span>.max);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Minimum value           : &quot;</span>, -<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">float</span>.max);
    writeln();
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Type                    : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.stringof);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Precision               : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.dig);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Minimum normalized value: &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.min_normal);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Maximum value           : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.max);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Minimum value           : &quot;</span>, -<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.max);
    writeln();
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Type                    : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span>.stringof);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Precision               : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span>.dig);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Minimum normalized value: &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span>.min_normal);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Maximum value           : &quot;</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span>.max);
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Minimum value           : &quot;</span>, -<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span>.max);
}
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The output of the program is the following in my environment. Since<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real</code><span class="Apple-converted-space">&nbsp;</span>depends 
on the hardware, you may get a different output for it:</p>
<pre class="shell" style="margin: 0.5em 1em 1em; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: rgb(224, 224, 224); font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">Type                    : float
Precision               : 6
Minimum normalized value: 1.17549e-38
Maximum value           : 3.40282e+38
Minimum value           : -3.40282e+38

Type                    : double
Precision               : 15
Minimum normalized value: 2.22507e-308
Maximum value           : 1.79769e+308
Minimum value           : -1.79769e+308

Type                    : real
Precision               : 18
Minimum normalized value: 3.3621e-4932
Maximum value           : 1.18973e+4932
Minimum value           : -1.18973e+4932
</pre>
<h6 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.1em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Observations</h6>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
As you will remember from the previous chapter, the maximum value of<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">ulong</code><span class="Apple-converted-space">&nbsp;</span>has 
20 digits: 18,446,744,073,709,551,616. That value looks small when compared to 
even the smallest floating point type:<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">float</code>can 
have values up to the 10<sup style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 0.75em; vertical-align: top; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">38</sup><span class="Apple-converted-space">&nbsp;</span>range, 
e.g. 340,282,000,000,000,000,000,000,000,000,000,000,000.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The maximum value of<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real</code><span class="Apple-converted-space">&nbsp;</span>is 
in the range 10<sup style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 0.75em; vertical-align: top; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">4932</sup>, 
a value with more than 4900 digits!</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
As another observation, let&#39;s look at the minimum value that<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">double</code>can 
represent with 15-digit precision: 0.000...<i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">there&nbsp;are&nbsp;300&nbsp;more&nbsp;zeroes&nbsp;here</i>...0000222507. 
(More precisely, the last part is ...222507385850720.)</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Overflow and underflow are not ignored</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Despite being able to take very large values, floating point types too are prone 
to overflow and underflow. The floating point types are safer than integer types 
in this regard because overflow and underflow are not ignored. The values that 
overflow become<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.infinity</code>, 
and the values that underflow become<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">-.infinity</code>. 
To see this, let&#39;s increment the value of<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.max</code><span class="Apple-converted-space">&nbsp;</span>by 
10%. Since the value is already at the maximum, incrementing by 10% would 
overflow:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">import</span> std.stdio;

<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">void</span> main()
{
    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span> value = <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">real</span>.max;

    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Before         : &quot;</span>, value);

    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// Multiplying with 1.1 is the same as making 110%
</span>    value *= 1.1;
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Added 10%      : &quot;</span>, value);

    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// Let&#39;s try to make it less by dividing in half
</span>    value /= 2;
    writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;Divided in half: &quot;</span>, value);
}
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Once the value overflows and becomes<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real.infinity</code>, 
it remains that way even after being divided in half:</p>
<pre class="shell" style="margin: 0.5em 1em 1em; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: rgb(224, 224, 224); font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">Before         : 1.18973e+4932
Added 10%      : inf
Divided in half: inf
</pre>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Precision</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Precision is a concept that we come across in daily life but not talk about 
much. Precision is the number of digits that is used when specifying a value. 
For example, when we say that the third of 100 is 33, the precision is 2 because 
33 has 2 digits. When the value is specified more precisely like 33.33, then the 
precision is 4 digits.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The number of bits that each floating type has not only effects its maximum 
value, but also its precision. The greater the number of bits, the more precise 
the values.</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
There is no truncation in division</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
As we have seen in the previous chapter, integer division cannot preserve the 
fractional part of the result:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">int</span> first = 3;
    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">int</span> second = 2;
    writeln(first / second);
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Output:</p>
<pre class="shell" style="margin: 0.5em 1em 1em; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: rgb(224, 224, 224); font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">1
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Floating point types don&#39;t have this<span class="Apple-converted-space">&nbsp;</span><i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">truncation</i><span class="Apple-converted-space">&nbsp;</span>problem; 
they are specifically for preserving the fractional parts:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span> first = 3;
    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span> second = 2;
    writeln(first / second);
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Output:</p>
<pre class="shell" style="margin: 0.5em 1em 1em; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: rgb(224, 224, 224); font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">1.5
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The accuracy of the fractional part depends on the precision of the type:<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real</code><span class="Apple-converted-space">&nbsp;</span>has 
the highest precision and<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">float</code><span class="Apple-converted-space">&nbsp;</span>has 
the lowest precision.</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Which type to use</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Unless there is a specific reason otherwise, you can choose<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">double</code><span class="Apple-converted-space">&nbsp;</span>for 
floating point values.<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">float</code><span class="Apple-converted-space">&nbsp;</span>has 
very low precision but because of being smaller than the other types, it may be 
useful when storage space is limited. On the other hand, since the precision of<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real</code><span class="Apple-converted-space">&nbsp;</span>is 
higher than<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">double</code><span class="Apple-converted-space">&nbsp;</span>on 
some hardware, it would be preferable for high precision calculations.</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Cannot represent all values</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
We cannot represent certain values in our daily lives. In the decimal system 
that we use daily, the digits before the decimal point represent ones, tens, 
hundreds, etc. and the digits after the decimal point represent tenths, 
hundreths, thousandths, etc.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
If a value is an exact combination of these values, it can be represented 
precisely. For example, because the value 0.23 consists of 2 tenths and 3 
hundreths it is represented precisely. On the other hand, the value of 1/3 
cannot be represented in the decimal system because it is never sufficient no 
matter how many digits are specified: 0.33333...</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
It is very similar with the floating point types. Because these types are based 
on certain numbers of bits, they cannot represent every value.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The difference with the binary system that the computers use is that the digits 
before the decimal point are ones, twos, fours, etc. and the digits after the 
decimal point are halves, quarters, eighths, etc. Only the values that are exact 
combinations of those digits can be represented precisely.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
A value that cannot be represented in computers is 0.1 as in 10 cents. Although 
this value can be represented precisely in the decimal system, its binary 
representation never ends and continuously repeats four digits as 
0.0001100110011... (Note that it is written in binary system, not decimal.) It 
is always inaccurate at some level depending on the precision of the floating 
point type that is used.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The following program demonstrates this problem. The value of a variable is 
being incremented by 0.001 a thousand times in a loop. Surprisingly, the result 
is not 1:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">import</span> std.stdio;

<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">void</span> main()
{
    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">float</span> result = 0;

    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// We would expect the result to be 1 after looping 1000
</span>    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// times:
</span>    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">while</span> (result &lt; 1) {
        result += 0.001;
    }

    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// Let&#39;s validate
</span>    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">if</span> (result == 1) {
        writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;As expected: 1&quot;</span>);

    } <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">else</span> {
        writeln(<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">&quot;DIFFERENT: &quot;</span>, result);
    }
}
</pre>
<pre class="shell" style="margin: 0.5em 1em 1em; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 13px; vertical-align: baseline; background-color: rgb(224, 224, 224); font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">DIFFERENT: 1.00099
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Because 0.001 cannot be represented precisely, that inaccuracy affects the 
result multiple times. The output suggests that the loop has been repeated 1001 
times.</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Comparing floating point values</h5>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
We have seen the following comparison operations for integers: equal to (<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">==</code>), 
not equal to (<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">!=</code>), 
less than (<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">&lt;</code>), 
greater than (<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">&gt;</code>), 
less than or equal to (<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">&lt;=</code>), 
and greater than or equal to (<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">&gt;=</code>). 
Floating point types have many more comparison operators.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Since the special value<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>represents 
invalid floating point values, it may not be compared with any other value. For 
example, it is meaningless to ask whether<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>or 
1 is greater.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
For that reason, floating point values introduce another comparison concept: 
unordered. Being unordered means that at least one of the values is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code>.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The following table includes all of the floating point comparison operators. All 
of the operators are binary operators (meaning that they take two operands) and 
used as in<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">left&nbsp;==&nbsp;right</code>. 
The columns that contain<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">false</code><span class="Apple-converted-space">&nbsp;</span>and<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">true</code><span class="Apple-converted-space">&nbsp;</span>are 
the results of the comparison operations.</p>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
The last column indicates whether the operation is meaningful if one of the 
operands is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code>. 
For example, even though the result of the expression<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">1.2 
&lt; real.nan</code><span class="Apple-converted-space">&nbsp;</span>is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">false</code>, 
that result is meaningless because one of the operands is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real.nan</code>. 
The result of the reverse comparison<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">real.nan 
&lt; 1.2</code><span class="Apple-converted-space">&nbsp;</span>would produce<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">false</code><span class="Apple-converted-space">&nbsp;</span>as 
well. The abreviation lhs stands for<span class="Apple-converted-space">&nbsp;</span><i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">left-hand 
side</i>, indicating the expression on the left-hand side of each operator.</p>
<table border="1" cellpadding="4" cellspacing="0" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; font-family: monospace; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;" width="560">
	<tbody style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<br />
			Operator</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<br />
			Meaning</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			If lhs<br />
			is greater</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			If lhs<br />
			is less</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			If both<br />
			are equal</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			If at least<br />
			one is .nan</th>
			<th scope="col" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			Meaningful<br />
			with .nan</th>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			==</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			&gt;</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is greater than</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">
			no</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			&gt;=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is greater than or equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">
			no</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			&lt;</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is less than</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">
			no</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			&lt;=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is less than or equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">
			no</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!&lt;&gt;=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not less than, not greater than, nor equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			&lt;&gt;</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is less than or greater than</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">
			no</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			&lt;&gt;=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is less than, greater than, or equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">
			no</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!&lt;=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not less than nor equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!&lt;</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not less than</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!&gt;=</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not greater than nor equal to</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!&gt;</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not greater than</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
		<tr align="center" style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			!&lt;&gt;</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			is not less than nor greater than</td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: rgb(139, 0, 0); background-position: initial initial; background-repeat: initial initial;">
			false</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">
			true</span></td>
			<td style="margin: 1em; padding: 0px; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; font-family: monospace; background-position: initial initial; background-repeat: initial initial;">
			<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial;">
			yes</span></td>
		</tr>
</table>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Note that it makes sense to use<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>with 
any operator that contains<i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">is 
not</i><span class="Apple-converted-space">&nbsp;</span>in its meaning, and the 
result is always<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">true</code>.<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>not 
being a valid value makes the results of most comparisons to have<span class="Apple-converted-space">&nbsp;</span><i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">not</i><span class="Apple-converted-space">&nbsp;</span>in 
their meanings.</p>
<h6 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.1em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">
isNaN()</code><span class="Apple-converted-space">&nbsp;</span>for<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code><span class="Apple-converted-space">&nbsp;</span>equality 
comparison</h6>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Because the result would always be<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">false</code><span class="Apple-converted-space">&nbsp;</span>according 
to the previous table, it is not possible to use the<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">==</code><span class="Apple-converted-space">&nbsp;</span>operator 
to determine whether the value of a floating point variable is<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code>:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">if</span> (variable == <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">double</span>.nan) {    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: red; background-position: initial initial; background-repeat: initial initial;">← WRONG</span>
</span>        <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// ...
</span>    }
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
For that reason, the<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">isNaN()</code><span class="Apple-converted-space">&nbsp;</span>function 
from the<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">std.math</code><span class="Apple-converted-space">&nbsp;</span>module 
must be used:</p>
<pre class="d_code" style="margin: 0.5em 1em 0.75em 16px; padding: 0.5em; border: 1px dotted rgb(153, 204, 153); outline: 0px; font-size: 1em; vertical-align: baseline; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">import</span> std.math;
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// ...
</span>    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: blue; background-position: initial initial; background-repeat: initial initial;">if</span> (isNaN(variable)) {    <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// ← correct
</span>        <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: transparent; color: green; background-position: initial initial; background-repeat: initial initial;">// ...
</span>    }
</pre>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Similarly, to determine whether a value is<span class="Apple-converted-space">&nbsp;</span><i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">not</i><span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">.nan</code>, 
one must use<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">!isNaN()</code>, 
because otherwise the<span class="Apple-converted-space">&nbsp;</span><code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">!=</code><span class="Apple-converted-space">&nbsp;</span>operator 
would always produce<code class="d_inline" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.2em; vertical-align: baseline; background-color: transparent; font-weight: bold; color: rgb(0, 34, 34); background-position: initial initial; background-repeat: initial initial;">true</code>.</p>
<h5 style="margin: 1.25em 0.5em 0.5em 8px; padding: 0px; border: 0px; outline: 0px; font-size: 1.25em; vertical-align: baseline; background-color: transparent; font-family: sans-serif; font-weight: bold; color: rgb(0, 0, 51); font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
Exercises</h5>
<ol style="margin: 1em 1em 0.75em 1.5em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	Modify the calculator from the previous chapter to support floating point 
	types. The new calculator would work more accurately with that change. When 
	trying the calculator, you can enter floating point values in various 
	formats as in 1000, 1.23, and 1.23e4.</li>
	<li style="margin: 0.5em 0px 0px 1em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
	Write a program that reads 5 floating point values from the input. Make the 
	program print first twice of those values and then one fifth of those 
	values.<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">
	This exercise is a preparation for the array concept of the next chapter. If 
	you write this program with what you have seen so far, you will understand 
	arrays easier and appreciate them more.</p>
	</li>
</ol>
<p style="margin: 0.75em 1em 0.75em 16px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
<a href="http://ddili.org/ders/d.en/floating_point.cozum.html" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; color: purple; text-decoration: none; background-position: initial initial; background-repeat: initial initial;" target="ddili_cozum">
<i style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: transparent; background-position: initial initial; background-repeat: initial initial;">
... the solutions</i></a></p>
<div id="ders_nav_son" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 0.9em; vertical-align: baseline; background-color: transparent; float: right; width: 190px; text-align: center; color: rgb(0, 0, 0); font-family: serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;">
	[<span class="Apple-converted-space">&nbsp;</span><a href="arithmetic.html" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: purple; text-decoration: none; background-position: initial initial; background-repeat: initial initial;">Prev&nbsp;</a>] 
	&nbsp; [<span class="Apple-converted-space">&nbsp;</span><a href="arrays.html" style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: purple; text-decoration: none; background-position: initial initial; background-repeat: initial initial;">Next&nbsp;</a>]</div>

</body>

</html>
